package com.hk.dao;

import com.hk.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminDao {

    List<Admin> queryAll();


    void addAdmin(Admin admin);

    void deleteAdmin(@Param("ids") List<Integer> ids);

    Admin getById(Integer id);

    void updataAdmin(Admin admin);

    @Select("select * from admin where admin_id = #{adminId} and password=#{password}")
    Admin getbyuseridANDpassword(Admin admin);

    void uploadURL(@Param("url") String url, @Param("adminId") String adminId);

    @Select("SELECT admin_id, name,gender,school,e_mail,phone,image FROM admin WHERE admin_id = #{adminId}")
    Admin HomeInfo(@Param("adminId") String adminId);
}
